namespace CloudNinja.Metering.Providers.Configuration.IISLog
{
    using System.Configuration;

    public abstract class TenantIdentifierPattern : ConfigurationElement
    {
        [ConfigurationProperty("Pattern", IsRequired = true)]
        public string Pattern
        {
            get
            {
                return (string)this["Pattern"];
            }

            set
            {
                this["Pattern"] = value;
            }
        }
    }

    public sealed class TenantIdentifierPatternUrlPart : TenantIdentifierPattern
    {
        protected override bool OnDeserializeUnrecognizedElement(string elementName, System.Xml.XmlReader reader)
        {
            return elementName.Equals("TenantIdentifierPatternUrlPart") || base.OnDeserializeUnrecognizedElement(elementName, reader);
        }
    }

    public sealed class TenantIdentifierPatternHostHeader : TenantIdentifierPattern
    {
        protected override bool OnDeserializeUnrecognizedElement(string elementName, System.Xml.XmlReader reader)
        {
            return elementName.Equals("TenantIdentifierPatternHostHeader") || base.OnDeserializeUnrecognizedElement(elementName, reader);
        }
    }
}